package com.cy.law.db.dao;

import com.cy.law.db.entity.DicGroup;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface DicGroupDao extends JpaRepository<DicGroup, Integer> {

    @Query("select DISTINCT c from DicGroup c, com.cy.law.db.entity.NavItem a, com.cy.law.db.entity.HumanNavItem b where a.navId = b.navId and b.humanId = ?1 and c.groupId = a.groupId")
    List<DicGroup> findHumanDicGroupInfo(Integer humanId);
}
